<?php


/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-20
 *
 */
 @session_start();

$root_path = '../'; //set the root path for this file

include_once $root_path . 'admin/smarty_config.php';
include_once $root_path . 'admin/class/temp.class.php';
/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(2);

/*
 * init vars
 */
$temp = new temp($root_path);

$temps = $temp->temp_get();

/*
 * process
 */
$info = '配置模版显示信息';
if (isset ($_POST['submit'])) {

$news_image=$_POST['news_image'];
$news_data=$_POST['news_data'];
$pros_image=$_POST['pros_image'];
$pros_data=$_POST['pros_data'];
$guest_num=$_POST['guest_num'];
$replay_num=$_POST['replay_num'];
$flink_num=$_POST['flink_num'];
$vote_num=$_POST['vote_num'];


 $line=$temp->temp_updata($news_image,$news_data,$pros_image,$pros_data,$guest_num,$replay_num,$flink_num,$vote_num);
	if($line){
		$info="更新成功";
	}else{
		$info="更新成功";
	}

}

/*
 * set templates
 *
 */
$smarty->assign("info", $info);
$smarty->assign("temp", $temps);
$smarty->display("temp.html");
?>
